class Solution(object):
    def findErrorNums(self, nums):
        """
        :type nums: List[int]
        :rtype: List[int]
        """
        filter = set(nums)
        true = [i for i in range(1, len(nums)+1)]
        double = sum(nums) - sum(filter)
        miss = sum(true) - sum(filter)
        return [double, miss]
if __name__ == '__main__':
    nums = [1,2,2,4]
    print(Solution().findErrorNums(nums))




